package the_fourth_chapter;

import java.util.Random;

/**
 * 模拟网上投票统计
 * 
 * @author explorati
 *
 */
public class Miss {

	// 投票
	public static void vote(int[] miss, int num) {
		miss[num]++;
	}

	public static void main(String[] args) {
		int[] miss = new int[10];

		for (int i = 1; i <= 50; i++) {
			int random = (int) (Math.random() * 10);
			vote(miss, random);
		}

		System.out.println("下面公布选票结果：");
		for (int i = 0; i < 10; i++) {
			System.out.println(i + 1 + "号佳丽的选票为：" + miss[i]);
		}
	}
}
